//
//  VC2Text.swift
//  ChapterAll
//
//  Created by Kevin on 2020/4/21.
//  Copyright © 2020 Kevin. All rights reserved.
//

import UIKit

class VC2Text: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let label = UILabel(frame: CGRect(x: 0, y: 100, width: UIScreen.main.bounds.width, height: 50))
        label.text = "Hello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello WorldHello World"
        label.backgroundColor = UIColor.blue
        label.numberOfLines = 0
        // 阴影颜色
//        label.shadowColor = UIColor.red
        // 阴影偏移量
//        label.shadowOffset = CGSize(width: 10, height: 10)
        label.textAlignment = .center
        // 设置断行模式
        label.lineBreakMode = .byTruncatingTail
        view.addSubview(label)
        
    }
}
